.hzdz-three-d-pie-chart {
  display: flex;
  padding: 0 15px;
  // background: #0a0e13;
  justify-content: space-between;
  box-sizing: border-box;
  .left-wrap{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35%;
    .value-wrap{
      margin-left: 5px;
      color:rgba(255,255,255,0.8);
      font-size: 13px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      .value{
        font-family: 'DINAlternate';
        font-weight: bold;
        font-size: 19px;
        background: linear-gradient(180deg, #FFFFFF 0%, #FFFFFF 3%, #81C6FF 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        display: flex;
        align-items: center;
      }
    }
  }
  .chart-area{
    width: 65%;
    height: 100%;
    position: relative;
    display: flex;
    .hovered-data{
      position: absolute;
      top: 51%;
      transform: translate(22%, -70%);
      color: #fff;
      font-size: 10px;
      text-align: center;
      z-index: 9999;  // 确保其置于最上层
      pointer-events: none;  // 确保它不会阻止图表的鼠标事件
      .hovered-value{
        margin-bottom: -5px;
        font-size: 18px;
        font-weight: bold;
        background: linear-gradient(180deg, #FFFFFF 0%, #FFFFFF 3%, #81C6FF 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
      }
    }
    .icon{
      width: 20px;
      height: 20px;
      margin-top: 10%;
    }
  }
  &__container {
    flex-shrink: 0;
  }

  &__canvas {
    display: block;
    border: 1px solid transparent; // 确保Canvas在低代码平台中可见
    min-width: 120px;
    min-height: 120px;
  }

  &__legend {
    display: flex;
    flex-direction: column;
    gap: 18px; // 设计稿中图例间距约18px
    min-width: 120px;
    padding: 16px;
    border-radius: 6px;
    flex: 1; // 占满剩余空间，避免右侧空白
  }

  &__legend-item {
    display: flex;
    align-items: center;
    gap: 9px; // 图标与文字间距约9px
    cursor: pointer;
    transition: all 0.3s ease;

    &:hover {
      transform: translateX(2px);
    }
  }

  &__legend-indicator {
    width: 6px;
    height: 7px;
    flex-shrink: 0;
    border-radius: 1px;
  }

  &__legend-content {
    display: flex;
    align-items: center;
    gap: 18px; // 标签与数值间距约18px
    flex: 1;
  }

  &__legend-label {
    font-family: 'SourceHanSansSC', 'SourceHanSansSC', '思源黑体', 'SimHei', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 24px;
    text-align: left;
    font-style: normal;
    text-transform: none;
    white-space: nowrap;
  }

  &__legend-value {
    font-family: 'DINAlternate', 'DINAlternate', 'Arial', sans-serif;
    font-weight: bold;
    font-size: 24px;
    line-height: 18px;
    text-align: center;
    font-style: normal;
    background: linear-gradient(90deg, #FFFFFF 0%, #81C6FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    min-width: 26px;
  }

  // 图例位置变体
  &--legend-right {
    flex-direction: row;
  }

  &--legend-left {
    flex-direction: row-reverse;
  }

  &--legend-bottom {
    flex-direction: column;

    .hzdz-three-d-pie-chart__legend {
      flex-direction: row;
      justify-content: center;
      flex-wrap: wrap;
    }
  }

  &--legend-top {
    flex-direction: column-reverse;

    .hzdz-three-d-pie-chart__legend {
      flex-direction: row;
      justify-content: center;
      flex-wrap: wrap;
    }
  }

  // 尺寸变体
  &--small {
    .hzdz-three-d-pie-chart__legend-label {
      font-size: 12px;
      line-height: 20px;
    }

    .hzdz-three-d-pie-chart__legend-value {
      font-size: 20px;
      line-height: 16px;
      min-width: 22px;
    }

    .hzdz-three-d-pie-chart__legend-indicator {
      width: 5px;
      height: 6px;
    }
  }

  &--medium {
    .hzdz-three-d-pie-chart__legend-label {
      font-size: 14px;
      line-height: 24px;
    }

    .hzdz-three-d-pie-chart__legend-value {
      font-size: 24px;
      line-height: 18px;
      min-width: 26px;
    }

    .hzdz-three-d-pie-chart__legend-indicator {
      width: 6px;
      height: 7px;
    }
  }

  &--large {
    .hzdz-three-d-pie-chart__legend-label {
      font-size: 16px;
      line-height: 28px;
    }

    .hzdz-three-d-pie-chart__legend-value {
      font-size: 28px;
      line-height: 22px;
      min-width: 30px;
    }

    .hzdz-three-d-pie-chart__legend-indicator {
      width: 8px;
      height: 9px;
    }
  }

  // 文本倾斜
  &--text-tilt {
    .hzdz-three-d-pie-chart__legend-label {
      font-style: italic;
      transform: skew(-10deg);
    }
  }

  // 主题变体
  &--dark {
    background: rgba(255, 255, 255, 0.05);

    .hzdz-three-d-pie-chart__legend {
      background: rgba(255, 255, 255, 0.03);
    }

    .hzdz-three-d-pie-chart__legend-label {
      color: #FFFFFF;
    }
  }

  &--light {
    background: rgba(0, 0, 0, 0.05);

    .hzdz-three-d-pie-chart__legend {
      background: rgba(0, 0, 0, 0.03);
    }

    .hzdz-three-d-pie-chart__legend-label {
      color: #333333;
    }

    .hzdz-three-d-pie-chart__legend-value {
      background: linear-gradient(90deg, #333333 0%, #666666 100%);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }
  }
}
